package com.powernode.test03.bean;

public class MyDate {
    int year;
    int month;
    int day;
    public MyDate(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }

    public void showDate(){
        System.out.println("日期："+year+"年"+month+"月"
                +day+"日");
    }
    public boolean isLeapYear(){
        if ((year%4==0&&year%100!=0)||year%400==0){
            System.out.println(year+"年是闰年");
            return true;
        }else {
            System.out.println(year+"年不是闰年");
            return false;
        }
    }
}
